package com.zhl.media.app.mvp.model;

import android.app.Application;

import com.google.gson.Gson;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.zhl.media.app.mvp.contract.FileUploadContract;
import com.zhl.media.app.mvp.model.api.service.AppService;
import com.zhl.media.commonsdk.base.BaseRespose;
import com.zhl.media.commonsdk.entity.FileAttachment;
import com.zhl.media.commonsdk.entity.MyPushPicture;
import com.zhl.media.commonsdk.utils.UploadFileRequestBody;

import java.util.List;

import javax.inject.Inject;

import io.reactivex.Observable;
import okhttp3.MultipartBody;


@ActivityScope
public class FileUploadModel extends BaseModel implements FileUploadContract.Model {
    @Inject
    Gson mGson;
    @Inject
    Application mApplication;

    @Inject
    public FileUploadModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.mGson = null;
        this.mApplication = null;
    }

    @Override
    public Observable<BaseRespose<List<MyPushPicture>>> currentPushImgList(String s) {
        return mRepositoryManager.obtainRetrofitService(AppService.class).currentPushImgList(s);
    }

}